<ion-app>
  <ion-header>
    <ion-toolbar>
      <ion-buttons slot="start">
        <ion-back-button defaultHref="/home" text="Back" color="primary"></ion-back-button>
      </ion-buttons>
      <ion-title>Send-Mail</ion-title>
    </ion-toolbar>
  </ion-header>

  <ion-content class="ion-padding">
    <form (ngSubmit)="sendEmail()">
      <ion-item>
        <ion-label position="floating">To (recipient)</ion-label>
        <ion-input [(ngModel)]="to" [ngModelOptions]="{ standalone: true }"></ion-input>
      </ion-item>

      <ion-item>
        <ion-label position="floating">Subject</ion-label>
        <ion-input [(ngModel)]="subject" [ngModelOptions]="{ standalone: true }"></ion-input>
      </ion-item>

      <ion-item>
        <ion-label position="floating">Email body (message)</ion-label>
        <ion-textarea [(ngModel)]="body" [ngModelOptions]="{ standalone: true }"></ion-textarea>
      </ion-item>

      <div style="text-align:center">
        <ion-button ion-button type="submit" expand="block" color="primary">Send</ion-button>
      </div>

    </form>
  </ion-content>

</ion-app>
